package com.molichuxing.services.infrastructure.service;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.DeviceCreateDto;
import com.molichuxing.services.infrastructure.dto.request.modify.DeviceModifyDto;
import com.molichuxing.services.infrastructure.dto.response.DealerDto;
import com.molichuxing.services.infrastructure.dto.response.DeviceDto;

/**
 * <p>
 * 经销商安装的设备表 服务类
 * </p>
 *
 * @author
 * @since 2019-08-12
 */
public interface DeviceService extends RootService {

    /**
     * 通过id获取设备信息
     *
     * @param ids
     * @return
     * @throws Exception
     */
    public List<DeviceDto> getDeviceListByIds(List<Integer> ids) throws Exception;

    /**
     * 通过cpu获取设备id
     *
     * @param cpus
     * @return
     * @throws Exception
     */
    public List<Integer> getDeviceListByCpu(List<String> cpus) throws Exception;

    /**
     * 根据cpu获取设备id
     *
     * @param cpu
     * @return
     */
    public Integer getDeviceIdByCpu(String cpu);


    /**
     * 根据cpu获取设备id
     *
     * @param cpu
     * @return
     */
    public DeviceDto getDeviceByCpu(String cpu);


    /**
     * 新增终端信息
     *
     * @param createDto
     * @return
     */
    public Boolean createDevice(DeviceCreateDto createDto);

    /**
     * 编辑终端信息
     *
     * @param modifyDto
     * @return
     */
    public Boolean modifyDevice(DeviceModifyDto modifyDto);

    /**
     * id
     *
     * @param id
     * @return
     */
    public DeviceDto getDeviceById(Integer id);

    /**
     * 设备列表
     *
     * @param map
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    Paged<DeviceDto> getDevicePage(Map<String, Object> map, Integer pageNum, Integer pageSize) throws Exception;

    Integer getCount(List<Integer> deviceIdList,LocalDateTime startHeartTime, LocalDateTime endHeartTime);

}
